package com.fjl.lock;

import java.util.concurrent.locks.ReentrantLock;

public class ReentrantLockTest {
	public static void main(String[] args) {

		ReentrantLock lock = new ReentrantLock();
		try{
			lock.lock();
			System.out.println();
		}finally {

		}

		Thread t1=new Thread(new Runnable() {
			@Override
			public void run() {
				try{
					lock.lock();
					System.out.println();
				}finally {
					lock.unlock();
				}
			}
		});
		t1.start();
		lock.unlock();
		System.out.println();
	}
}
